<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateZhyReportTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('zhy_report', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->text('company_name')->nullable()->comment('公司名称');
            $table->string('number',100)->nullable()->comment('报告编号');
            $table->string('qrcode_image',100)->nullable()->comment('二维码图片');
            $table->string('position',300)->nullable()->comment('项目位置');
            $table->string('client',300)->nullable()->comment('委托方');
            $table->string('total_price',100)->nullable()->comment('总价');
            $table->string('price',100)->nullable()->comment('单价');
            $table->string('built_in',100)->nullable()->comment('建成年代');
            $table->string('property_nature',100)->nullable()->comment('产权性质');
            $table->integer('is_change')->nullable()->comment('物理结构是否变化');
            $table->timestamps();
            $table->softDeletes();
        });
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE `zhy_report` comment '报告表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('zhy_report');
    }
}
